.form-view--table {
  padding: 0px 30px;
  position: relative;

  .form-view__group--table-header {
    padding: 10px 0px 0px 0px;
    display: flex;
    justify-content: 'space-between';
    transition: 0.3s all;
    opacity: 1;

    &.form-view__group--table-loading {
      opacity: 0.25;
    }

    .form-view__item--table-meta {
      flex-grow: 1;
      line-height: 20px;
      padding: 10px 0;

      > *:not(:first-child)::before {
        content: "·";
        margin: auto 5px;
      }

      .select-all {
        cursor: pointer;
        color: $cool-blue;

        &:hover {
          color: lighten($cool-blue, 10%);
        }
      }
    }

    .form-view__item--table-buttons {
      flex-grow: 1;
      text-align: right;

      button {
        overflow: visible;
      }
    }
  }

  .ReactTable {
    border: none;
    background: transparent;
    height: calc(100% - 50px);

    .rt-table {
      border: 1px solid $divider-color;
      background-color: #FFF;
      font-size: 13px;
    }

    .rt-tbody, .rt-thead {
      overflow-x: hidden;

      .table-header-checkbox {
        min-height: 24px;
        display: block;
        text-align: center;

        .checkbox__input {vertical-align: middle;}
      }
    }

    // minimum body height so at least two rows are visible
    .rt-tbody {
      min-height: 72px;
    }

    .rt-thead {
      .rt-tr {
        align-items: center;
      }

      .rt-resizable-header-content {
        overflow: visible;
        text-overflow: inherit;
        line-height: 1.2;
        padding: 5px 0;

        .column-header-title,
        .column-header-hxl-tags {
          display: block;
          width: 100%;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .column-header-hxl-tags {
          color: $cool-silver;
        }
      }
    }

    .rt-thead {
      &.-filters input {
        padding: 2px 4px;
      }

      &.-filters select {
        margin-top: 2px;
        margin-right: 2px;
      }

      .rt-th:hover,
      .rt-td:hover {
        background: rgba($cool-green, 0.1);
      }

      .rt-th.-sort-desc,
      .rt-td.-sort-desc {
        box-shadow: inset 0 -3px 0 0 rgba($cool-green, 0.8);
      }

      .rt-th.-sort-asc,
      .rt-td.-sort-asc {
        box-shadow: inset 0 3px 0 0 rgba($cool-green, 0.8);
      }
    }

    .rt-tr-group {
      max-height: 36px;
    }

    .rt-tr {
      align-items: stretch;
    }

    .rt-th, .rt-td {
      padding: 2px;
      padding-left: 6px;
      border-right: 1px solid rgba(0, 0, 0, 0.03);
      line-height: 30px;
    }

    .rt-td.rt-status {
      line-height: inherit;
      overflow: visible;

      .kobo-select__control {
        background: transparent;
        height: 30px;
        min-height: 30px;
        border: none;
        border-radius: 0px;
        box-shadow: none;
        cursor: pointer;

        &:hover {
          box-shadow: none;
        }
      }
    }

    .rt-link {
      overflow: visible;

      .table-link {
        cursor: pointer;
        display: inline-block;
        min-height: 28px;

        &:hover {
          color: $cool-blue;
        }

        i {
          font-size: 32px;
          vertical-align: middle;
        }
      }
    }

    .-pagination {
      box-shadow: none;
      border-top: none;

      .-center {
        flex: 2;
      }

      .-btn {
        @extend .mdl-button, .mdl-button--colored;

        &:hover {
          background: transparent;
        }
      }
    }

    .pagination-bottom {
      margin-top: 5px;
      margin-bottom: 5px;
    }

    .-loading {
      background: #F8F8F8;

      .-loading-inner {
        display: block;
        text-align: center;
        font-size: 18px;
        opacity: 0.8;
        color: $cool-gray;

        i {
          margin-right: 12px;
          vertical-align: middle;
          font-size: 24px;
        }
      }
    }

    &.-highlight .rt-tbody .rt-tr:not(.-padRow):hover {
      background: rgba($cool-green, 0.1);
    }

    &.has-frozen-column {
      .frozen {
        order: -1;
        position: relative;
        left: 0;
        background: #F8F8F8;
        height: 36px;
        transition: left 0.2s;
        margin-right: 6px;

        &:not(.rt-status) {
          z-index: 2;

          &:hover {
            z-index: 3;
          }
        }
      }

      &.-striped .rt-tr.-odd .frozen {
        background: #F1F1F1;
      }

      &.-striped .rt-tr:hover .frozen {
        background: #edf9fa;
      }

      .rt-th.frozen {
        height: 34px;
      }
    }
  }

  .form-view__cell--table-warning {
    position: absolute;
    width: calc(100% - 60px);
    background: lighten(#FFB775, 20%);
    padding: 5px;
    top: 10px;
    z-index: 99;

    i.k-icon-alert {
      font-size: 32px;
      vertical-align: middle;
      color: #FFB775;
    }

    a {
      cursor: pointer;
    }

    i.k-icon-close {
      position: absolute;
      right: 10px;
      font-size: 24px;
      top: 10px;
      background: lighten(#FFB775, 20%);
      cursor: pointer;
    }
  }
}

.tableColumn-modal {
  .form-view__cell--label {
    padding-bottom: 10px;
  }

  .form-modal__item {
    margin-bottom: 20px;

    &--advanced-table-options {
      border: 1px solid $divider-color;
      padding: 20px;
      background: #F8F8F8;

      .form-view__cell--note {
        padding-bottom: 20px;
      }

      .form-modal__item:last-child {
        margin-bottom: 0px;
      }
    }
  }

  .form-modal__item--translation-radios {
    .radio__row--title {
      font-size: inherit;
      color: inherit;
      font-weight: 500;
    }
  }

  ul {
    max-height: 160px;
    overflow: auto;
    border: 1px solid $divider-color;
    padding: 10px;
    background: #FFF;

    li {
      margin-bottom: 5px;
      max-width: 100%;
    }
  }
}

@media screen and (max-width: 767px) {
  .form-view--table {
    padding: 0px 20px;
  }

  .form-view--table .ReactTable .pagination-bottom {
    margin-bottom: 10px;
  }
}
